package com.talent.service.admin.controller;

import com.talent.common.model.TalentResult;
import com.talent.model.dto.LoginDto;
import com.talent.model.vo.LoginVo;
import com.talent.service.admin.service.ILoginService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName：LoginController
 * @Author: hszhou
 * @Date: 2025/2/18 16:51
 * @Description: 必须描述类做什么事情, 实现什么功能
 */
@RestController
@RequiredArgsConstructor
public class LoginController {


    private final ILoginService loginService;


    @PostMapping("login")
    public TalentResult<LoginVo> login(@RequestBody LoginDto loginDto) {
        LoginVo login = loginService.login(loginDto);
        return TalentResult.success(login);
    }
}
